[in_app_purchase] Define clang module for iOS#2125
Conversation
| #import "InAppPurchasePlugin.h" | ||
|
|
||
| NS_ASSUME_NONNULL_BEGIN | ||
| API_AVAILABLE(ios(11.2), macos(10.13.2)) |
| @"localizedTitle" : @"title", | ||
| @"localizedDescription" : @"des", | ||
| }]; | ||
| if (@available(iOS 11.2, *)) { |
There was a problem hiding this comment.
Added availability so these tests passed with older SDKs.
| @@ -0,0 +1,206 @@ | |||
| // Copyright 2019 The Chromium Authors. All rights reserved. | |||
There was a problem hiding this comment.
These test files were moved from the example/ project to the new Tests/ directory. Added symlinks from the old location so the tests still pass in the example app.
There was a problem hiding this comment.
Turns out Xcode really didn't link the symlinking. I changed the Xcode project to just point at the new location instead of following the symlinks.
| @@ -1,183 +0,0 @@ | |||
| // Copyright 2019 The Chromium Authors. All rights reserved. | |||
There was a problem hiding this comment.
@cyanglaz This test doesn't compile and wasn't included in the Xcode project, so I deleted it. I can file an issue for it to be re-added and fixed to pass, if you still find value in it.
There was a problem hiding this comment.
Yes, please add this test case back to the project and remove the .testing part to fix the compilation. I am not sure why it would be like this in the first place.
cyanglaz
left a comment
There was a problem hiding this comment.
LGTM overall. Left some comments.
| payment.applicationUsername = [paymentMap objectForKey:@"applicationUsername"]; | ||
| NSNumber *quantity = [paymentMap objectForKey:@"quantity"]; | ||
| payment.quantity = quantity ? quantity.integerValue : 1; | ||
| payment.quantity = (quantity != nil) ? quantity.integerValue : 1; |
There was a problem hiding this comment.
what is the different or benefit we gain with this change?
There was a problem hiding this comment.
It fixes a static analyzer warning:
157:24: warning: Converting a pointer value of type 'NSNumber *' to a primitive boolean value; instead, either compare the pointer to nil or call -boolValue
payment.quantity = quantity ? quantity.integerValue : 1;
| @interface FIAPReceiptManagerStub : FIAPReceiptManager | ||
| @end | ||
|
|
||
| API_AVAILABLE(ios(7.0), macos(10.9)) |
There was a problem hiding this comment.
Flutter supports 8 and up so this might not be necessary. I'm ok leave it though.
There was a problem hiding this comment.
I'll remove it, most of the others should also have API_AVAILABLE(ios(7.0), macos(10.9)) so this isn't consistent.
| author: Flutter Team <flutter-dev@googlegroups.com> | ||
| homepage: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase | ||
| version: 0.2.1+4 | ||
| version: 0.2.2 |
There was a problem hiding this comment.
If there is no public API change, we just need to update the patch, thus 0.2.1+5
I might have missed something though. Please point it out if so.
There was a problem hiding this comment.
The only public API change was adding the nullability return value. The podspec change means this will be imported as a module, so modulemaps get generated, and CocoaPods does a lot of other magic. I'm happy to change this to 0.2.1+5 though!
…pecially deployment target
Description
DEFINES_MODULEin the podspec. See CocoaPod modular headers docs.VALID_ARCHSto architectures included in the Flutter universal binary. This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator. See Fix linting when armv7 is included but i386 isn't CocoaPods/CocoaPods#8159.-boolValueRelated Issues
Fixes flutter/flutter#41648.
See also flutter/flutter#41007.
Tests
s.platformands.pod_target_xcconfigchanges.Checklist
///).flutter analyze) does not report any problems on my PR.Breaking Change